package com.ruoyi.constant;

/**
 * 矿山图层占地分类枚举
 */
public enum KsTcZdfsEnum {

    LX1("10", "采场"),
    LX2("20", "工业广场"),
    LX3("2A", "堆煤场"),
    LX4("2B", "其他矿石堆"),
    LX5("2C", "洗煤场"),
    LX6("2D", "选矿场"),
    LX7("2E", "选矿池"),
    LX8("30", "固体废弃物"),
    LX9("3A", "排土场"),
    LX10("3B", "尾矿库"),
    LX11("3C", "煤矸石堆"),
    LX12("3D", "废石堆"),
    LX13("40", "矿山建筑"),
    LX14("50", "开采点");

    private String code;
    private String desc;

    KsTcZdfsEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(String code) {
        for (KsTcZdfsEnum value : KsTcZdfsEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return "";
    }

    public static String getCodeByDesc(String desc) {
        for (KsTcZdfsEnum value : KsTcZdfsEnum.values()) {
            if (value.getDesc().equals(desc)) {
                return value.getCode();
            }
        }
        return "";
    }
}
